package com.demo.demospringbootstarter.entity;


import com.demo.demospringbootstarter.common.SmsTypeEnum;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = DemoProperties.demoPrefix)
public class DemoProperties {

    private String type;

    static final String demoPrefix="demo";

    private boolean enable;

    private String name;

    private Aliyun aliyun;

    public String getType() {
        if(type == null || "".equals(type)){
            type = SmsTypeEnum.ALI_CLOUD.name();
        }
        return type;
    }

    @Data
    public static class Aliyun {
        private String signName;
    }
}
